<template>
	<view class="content">
		<view class="flex-row food">
			<view class="food-item" v-for="(item,index) in dataList" :key="index" @tap="goList(item,index)">
				<image :src="item.imgUrl" mode=""></image>
				<text>{{item.name}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			dataList:Array
		},
		data() {
			return {
				
			}
		},
		methods:{
			goList(item,index){
				uni.navigateTo({
					url:'/pages/list/list?id='+JSON.stringify(item.id)+''
				})
			}
		}
	}
</script>

<style lang="scss">
	.food {
		display: flex;
		flex-wrap: wrap;
		margin-top: 30rpx;
	}
	.food-item {
		width: 110rpx;
		height: 150rpx;
		font-size: 26rpx;
		margin-left: 30rpx;
		margin-top: 30rpx;
		image {
			width: 110rpx;
			height: 100rpx;
		}
	}
</style>